package com.ourteam.product.ui.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-14 15:16:12 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductUITabItemBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.ui.dao.ProductUITabItem productUITabItem;

  protected BeanMap getBeanMap() {

    return new BeanMap(productUITabItem);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.ui.dao.IProductUITabItemDAO.Id);

    mappedDaoFields.put("tabId", com.ourteam.product.ui.dao.IProductUITabItemDAO.TabId);

    mappedDaoFields.put("formId", com.ourteam.product.ui.dao.IProductUITabItemDAO.FormId);

    mappedDaoFields.put("code", com.ourteam.product.ui.dao.IProductUITabItemDAO.Code);

    mappedDaoFields.put("title", com.ourteam.product.ui.dao.IProductUITabItemDAO.Title);

    mappedDaoFields.put("titleKey", com.ourteam.product.ui.dao.IProductUITabItemDAO.TitleKey);

    mappedDaoFields.put("icon", com.ourteam.product.ui.dao.IProductUITabItemDAO.Icon);

    mappedDaoFields.put(
        "compentClass", com.ourteam.product.ui.dao.IProductUITabItemDAO.CompentClass);

    mappedDaoFields.put("sortIndex", com.ourteam.product.ui.dao.IProductUITabItemDAO.SortIndex);

    mappedDaoFields.put(
        "lastModifyUser", com.ourteam.product.ui.dao.IProductUITabItemDAO.LastModifyUser);

    mappedDaoFields.put(
        "lastModifyTime", com.ourteam.product.ui.dao.IProductUITabItemDAO.LastModifyTime);

    mappedDaoFields.put("status", com.ourteam.product.ui.dao.IProductUITabItemDAO.Status);

    mappedDaoFields.put("remarks", com.ourteam.product.ui.dao.IProductUITabItemDAO.Remarks);

    mappedDaoFields.put("formCode", com.ourteam.product.ui.dao.IProductUITabItemDAO.FormCode);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductUITabItemBean() {
    super();

    this.productUITabItem = new com.ourteam.product.ui.dao.ProductUITabItem();
  }

  public ProductUITabItemBean(com.ourteam.product.ui.dao.ProductUITabItem productUITabItem) {
    super();

    this.productUITabItem = productUITabItem;
  }

  public com.ourteam.product.ui.dao.ProductUITabItem convertToProductUITabItem() {
    return this.productUITabItem;
  }

  public com.ourteam.product.ui.dao.ProductUITabItem convertTo() {
    return this.productUITabItem;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productUITabItem.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productUITabItem.setId(id);
  }

  /**
   * Get tabId
   *
   * @return long
   */
  public long getTabId() {
    return (long) this.productUITabItem.getTabId();
  }

  /**
   * Set tabId
   *
   * @parameter long
   */
  public void setTabId(long tabId) {

    this.productUITabItem.setTabId(tabId);
  }

  /**
   * Get formId
   *
   * @return long
   */
  public long getFormId() {
    return (long) this.productUITabItem.getFormId();
  }

  /**
   * Set formId
   *
   * @parameter long
   */
  public void setFormId(long formId) {

    this.productUITabItem.setFormId(formId);
  }

  /**
   * Get code
   *
   * @return String
   */
  public String getCode() {
    return (String) this.productUITabItem.getCode();
  }

  /**
   * Set code
   *
   * @parameter String
   */
  public void setCode(String code) {

    this.productUITabItem.setCode(code);
  }

  /**
   * Get title
   *
   * @return String
   */
  public String getTitle() {
    return (String) this.productUITabItem.getTitle();
  }

  /**
   * Set title
   *
   * @parameter String
   */
  public void setTitle(String title) {

    this.productUITabItem.setTitle(title);
  }

  /**
   * Get titleKey
   *
   * @return String
   */
  public String getTitleKey() {
    return (String) this.productUITabItem.getTitleKey();
  }

  /**
   * Set titleKey
   *
   * @parameter String
   */
  public void setTitleKey(String titleKey) {

    this.productUITabItem.setTitleKey(titleKey);
  }

  /**
   * Get icon
   *
   * @return String
   */
  public String getIcon() {
    return (String) this.productUITabItem.getIcon();
  }

  /**
   * Set icon
   *
   * @parameter String
   */
  public void setIcon(String icon) {

    this.productUITabItem.setIcon(icon);
  }

  /**
   * Get compentClass
   *
   * @return String
   */
  public String getCompentClass() {
    return (String) this.productUITabItem.getCompentClass();
  }

  /**
   * Set compentClass
   *
   * @parameter String
   */
  public void setCompentClass(String compentClass) {

    this.productUITabItem.setCompentClass(compentClass);
  }

  /**
   * Get sortIndex
   *
   * @return int
   */
  public int getSortIndex() {
    return (int) this.productUITabItem.getSortIndex();
  }

  /**
   * Set sortIndex
   *
   * @parameter int
   */
  public void setSortIndex(int sortIndex) {

    this.productUITabItem.setSortIndex(sortIndex);
  }

  /**
   * Get lastModifyUser
   *
   * @return String
   */
  public String getLastModifyUser() {
    return (String) this.productUITabItem.getLastModifyUser();
  }

  /**
   * Set lastModifyUser
   *
   * @parameter String
   */
  public void setLastModifyUser(String lastModifyUser) {

    this.productUITabItem.setLastModifyUser(lastModifyUser);
  }

  /**
   * Get lastModifyTime
   *
   * @return java.util.Date
   */
  public java.util.Date getLastModifyTime() {
    return (java.util.Date) this.productUITabItem.getLastModifyTime();
  }

  /**
   * Set lastModifyTime
   *
   * @parameter java.util.Date
   */
  public void setLastModifyTime(java.util.Date lastModifyTime) {

    this.productUITabItem.setLastModifyTime(lastModifyTime);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productUITabItem.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productUITabItem.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productUITabItem.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productUITabItem.setRemarks(remarks);
  }

  /**
   * Get formCode
   *
   * @return String
   */
  public String getFormCode() {

    return (String) this.productUITabItem.getFormCode();
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductUITabItemBean) == false) {
      return false;
    } // end if

    ProductUITabItemBean other = (ProductUITabItemBean) obj;

    boolean isEqual = false;

    com.ourteam.product.ui.dao.ProductUITabItem tempProductUITabItem =
        other.convertToProductUITabItem();

    if (tempProductUITabItem == null || this.productUITabItem == null) {
      isEqual = false;
    } else if (tempProductUITabItem == this.productUITabItem
        || tempProductUITabItem.equals(this.productUITabItem)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductUITabItemBean[] toArray(
      com.ourteam.product.ui.dao.ProductUITabItem[] aProductUITabItems) {

    return toArray(aProductUITabItems, null);
  }

  public static ProductUITabItemBean[] toArray(
      com.ourteam.product.ui.dao.ProductUITabItem[] aProductUITabItems,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductUITabItems)) {
      return new ProductUITabItemBean[0];
    }

    int length = aProductUITabItems.length;

    ProductUITabItemBean[] beans = new ProductUITabItemBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductUITabItemBean(aProductUITabItems[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductUITabItems[i]});
      }
    }

    return beans;
  }
}
